package com.expdatacloud.service;

import com.expdatacloud.entity.IqcCheckItemDetails;
import com.expdatacloud.entity.IqcDetection;
import com.expdatacloud.entity.IqcDetectionDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 检验明细表 服务类
 * </p>
 *
 * @author jie
 * @since 2019-11-14
 */
public interface IqcCheckItemDetailsService  {

    /**
     * 查询
     */
    List<IqcCheckItemDetails> list(String checkProjectKey ,@Param("receiptKey") String receiptKey, @Param("sku") String sku);

    /**
     * 更新
     */
    int update(IqcCheckItemDetails iqcCheckItemDetails);

    /**
     * 插入
     */
    int insert(IqcCheckItemDetails iqcCheckItemDetails);

    /**
     * 获取检验项目集合的数据写入到检验项目明细表
     * @param checkItemName 检验项目集合名称
     * @param receiptLineNumber 行号
     * @param receiptKey 收货单号
     */
   void writeData( List<IqcCheckItemDetails> iqcCheckItemDetailsList,String checkItemName, String receiptKey,String sku,String user);

    /**
     * 调用存储过程移库
     */
    String pro_yt_3nod_move( List<IqcDetectionDetail> iqcDetectionDetailList,String user,IqcDetection iqcDetection);


    /**
     * 查询至库位
     */
    String getUDF1();

    /**
     * 写入数据到履历表
    */
    int writeDateToHistory(String users,String library,IqcDetection iqcDetection, List<IqcCheckItemDetails> iqcCheckItemDetails, List<IqcDetectionDetail> iqcDetectionDetail);

    int insertToHistory(String users,String library,IqcDetection iqcDetection, List<IqcCheckItemDetails> iqcCheckItemDetails);

    /**
     * 由于用户没有填写检验类别，系统自动填充
     */
    String sysToAddInspectionCategory(String receiptkey,String sku,String user);
}
